import Cookies from 'js-cookie'

// localStorage 的 Cookies 方式

const TokenKey = 'vue_admin_template_token'

const oldTime = 'old_Time'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function setTime() {
  return Cookies.set(oldTime, Date.now())
}

export function getTime() {
  return Cookies.get(oldTime)
}
